#include <stdio.h>
int shulie(int x)
{
	if (x <= 2)
		return 1;
	else
		return  shulie(x - 1) + shulie(x - 2);
}

/*
{
	int a = 0;
	scanf_s("%d", &a);
	int r = shulie(a);
		printf("%d", r);
	return 0;

}*/
int shulie1(int x)
{
	
	int a = 1;
	int b = 1;
	int c = 1;
	while (x > 2)
	{
		c = a + b;
		a = b;
		b = c;
		x--;
	}
	return c;
}
int main()

{
	int a = 0;
	scanf_s("%d", &a);
	int r = shulie1(a);
	printf("%d", r);
	return 0;
}